import { selector } from "recoil";
import { loginInfo } from "@atoms/atomsLoginInfo";

export const getLoginInfoState = selector({
  key: "getLoginInfoState",
  get: ({ get }) => {
      const data = get(loginInfo)
      if(Object.keys(data).length){
          return data
      }else{
          return sessionStorage.userInfo&&JSON.parse(sessionStorage.userInfo)
      }
  },
});
